{% extends 'TopxiaWebBundle::bootstrap-modal-layout.html.twig' %}

{% set modalSize = 'large' %}
{% block title %}{{'录播显示编辑'|trans}}{% endblock %}
{% block body %}
	<form class="form-inline" id="replay_manage_form" method="POST" action="{{ path('live_course_manage_lesson_replay_edit',{lessonId:lessonId,courseId:courseId}) }}">
	  	{% for replayLesson in replayLessons %}
	  		<div class="form-group mbm" style="position: relative; padding-left:20px;height: 40px;line-height:40px">
	  			<label style="position: absolute; top:0;left:0"><input type="checkbox" name="visibleReplaies[]" {% if replayLesson.hidden == 0 %}checked="checked" {% endif %} value="{{replayLesson.id}}"></label>
	  			<a class="link-light text-overflow" style="width:150px" href="javascript:;" id="replay-name-span-{{replayLesson.id}}" role='replay-name-span' data-replay-id="{{replayLesson.id}}" >{{ replayLesson.title }}</a>
					<input class="form-control" style="width:150px; display:none" id="replay-name-input-{{replayLesson.id}}" data-replay-id="{{replayLesson.id}}" role='replay-name-input' data-url="{{path('live_course_manage_lesson_replay_title_update', {courseId:replayLesson.courseId, lessonId:replayLesson.lessonId, replayId:replayLesson.id})}}" type="text" name="name" value="{{ replayLesson.title }}">
	  		</div>
	  	{% endfor %}
	  <input type="hidden" name="_csrf_token" value="{{ csrf_token('site') }}">
	</form>

	<script>app.load('live-course-manage/replay-lesson-modal')</script>

{% endblock %}
{% block footer %}
	<button id="server-create-btn" data-submiting-text="{{'正在提交'|trans}}" type="submit" class="btn btn-primary pull-right" data-toggle="form-submit" data-target="#replay_manage_form">{{'提交'|trans}}</button>
	<button type="button" class="btn btn-link pull-right" data-dismiss="modal">{{'取消'|trans}}</button>
{% endblock %}